# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BigLake.V1.Model.Table do
  @moduledoc """
  Represents a table.

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The creation time of the table.
  *   `deleteTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The deletion time of the table. Only set after the table is deleted.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - The checksum of a table object computed by the server based on the value of other fields. It may be sent on update requests to ensure the client has an up-to-date value before proceeding. It is only checked for update table operations.
  *   `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when this table is considered expired. Only set after the table is deleted.
  *   `hiveOptions` (*type:* `GoogleApi.BigLake.V1.Model.HiveTableOptions.t`, *default:* `nil`) - Options of a Hive table.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name. Format: projects/{project_id_or_number}/locations/{location_id}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
  *   `type` (*type:* `String.t`, *default:* `nil`) - The table type.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The last modification time of the table.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :deleteTime => DateTime.t() | nil,
          :etag => String.t() | nil,
          :expireTime => DateTime.t() | nil,
          :hiveOptions => GoogleApi.BigLake.V1.Model.HiveTableOptions.t() | nil,
          :name => String.t() | nil,
          :type => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:createTime, as: DateTime)
  field(:deleteTime, as: DateTime)
  field(:etag)
  field(:expireTime, as: DateTime)
  field(:hiveOptions, as: GoogleApi.BigLake.V1.Model.HiveTableOptions)
  field(:name)
  field(:type)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.BigLake.V1.Model.Table do
  def decode(value, options) do
    GoogleApi.BigLake.V1.Model.Table.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BigLake.V1.Model.Table do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
